package com.zsrt.java.day20170103.wrl.t07.exc;

import java.util.Scanner;

public class ExceptionDemo01 {
	public static void main(String[] args) {
		int i = 0;
		int j = 0;
		System.out.println("请输入两个整数：");
		Scanner input = new Scanner(System.in);
		String a = input.next();
		String b = input.next();
		System.out.println("===========try开始==============");
		try {
			i = Integer.valueOf(a);
			j = Integer.valueOf(b);
			int temp = i/j;
			System.out.println("两数相除的结果："+temp);
		} catch (Exception e) {
			System.out.println("出现异常："+e);
		}
		System.out.println("===========计算结束===============");
		input.close();
	}

}
